home *** CD-ROM | disk | FTP | other *** search
- PROGRAM DEMO_for_NOISE;
- { Written by E. Kasey Kasemodel }
- {Delete the next line for TP3}
- USES Crt;
- VAR N : byte;
-
- PROCEDURE Noise(Start, {starting frequency}
- Stop, {ending frequency}
- Step, {step size}
- Del, {time per step}
- Times, {repeats of whole sound}
- Pause {pause between repeats}
- : Integer);
- VAR
- a, diff, z : Integer;
- BEGIN
- a := Start;
- diff := 0;
- z := 0;
- FOR z := 1 TO Times DO
- BEGIN
- Sound(a); Delay(Del); NoSound; { make sound the first time }
- REPEAT
- IF Start > Stop THEN { noise goes down }
- BEGIN
- a := a-Step; { take step value away from current freq }
- diff := a-Stop; { check difference between freq and stop }
- END
- ELSE { noise goes up }
- BEGIN
- a := a+Step;
- diff := Stop-a;
- END;
- Sound(a); Delay(Del); NoSound; { produce updated sound }
- UNTIL (diff < 0); { keep looping til freq goes past stop }
- a := Start; { start over for another loop }
- Delay(Pause); { wait between loops }
- END; {for z} { do it again if necessary }
- END;
-
- BEGIN
- ClrScr;
- WriteLn('NOISE.PAS By E. Kasey Kasemodel');
-
- Write('01 '); Noise(100, 50, 1, 15, 5, 100); Delay(1000);
- Write('02 '); Noise(100, 250, 10, 50, 3, 100); Delay(1000);
- Write('03 '); Noise(2000, 250, 50, 5, 2, 100); Delay(1000);
- Write('04 '); Noise(50, 2500, 50, 5, 4, 50); Delay(1000);
-
- Write('05 '); Noise(4000, 1000, 150, 3, 3, 50);
- Noise(1000, 4000, 150, 3, 3, 50); Delay(1000);
-
- Write('06 '); Noise(1000, 6000, 100, 3, 3, 50);
- Noise(4000, 250, 80, 3, 2, 75);
- Noise(50, 5500, 133, 4, 2, 25);
- Noise(2000, 1000, 60, 3, 3, 50); Delay(1000);
-
- Write('07 '); Noise(2000, 2400, 2, 2, 2, 50); Delay(1000);
-
- Write('08 '); FOR N := 1 to 8 DO
- BEGIN
- Noise(1000, 2000, 15, 2, 1, 0);
- Noise(2000, 1000, 15, 2, 1, 0);
- END; Delay(1000);
- Write('09 '); Noise(1000,2000, 500, 2, 200, 0);
-
- END.
-